package com.kk.lesson03;

import java.awt.*;

public class TestPaint {
    public static void main(String[] args) {
        new MyPaint().loadFrame();
    }
}
class MyPaint extends Frame{
    public void loadFrame()
    {
        setBounds(200,200,600,400);
        setVisible(true);
    }
    //画笔
    @Override
    public void paint(Graphics g) {
        //画笔需要有颜色，画笔可以画画
        g.setColor(Color.red);
        g.drawOval(100,100,100,100);//空心圆
        g.fillOval(100,200,100,100);//实心圆
        g.setColor(Color.green);
        g.fill3DRect(200,200,100,100,false);

        //养成习惯，画笔用完。将它还原到最初的颜色
    }
}